package com.slz3.business.module.configManagement.conCircle.steward;

import com.slz3.business.module.configManagement.conCircle.domain.ConCircle;
import com.slz3.business.module.configManagement.conCircle.domain.ConCircleCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConCircleResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConCircle.class).flatMap(conCircle ->
                ConCircleResController.add(req, conCircle)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.delete(req, conCircleCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConCircle.class).flatMap(conCircle ->
                ConCircleResController.modify(req, conCircle)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return ConCircleResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return ConCircleResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return ConCircleResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.auditSubmit(req, conCircleCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.audit(req, conCircleCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.auditReject(req, conCircleCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.usingEnable(req, conCircleCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConCircleCondition.class).flatMap(conCircleCondition ->
                ConCircleResController.usingDisable(req, conCircleCondition)
        );
    }   

}
